<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;


class CreateHscoinStatsTable extends Migration
{
    public function up()
    {
        Schema::create('hscoin_stats', function (Blueprint $table) {
            $table->unsignedInteger('id')->autoIncrement()->comment('id');
            $table->tinyInteger('cache_type')->notNull()->default(0)->comment('主类型 :9余额 1 收入 -1支出 ');
            $table->tinyInteger('category')->notNull()->default(0)->comment('分类');
            $table->decimal('cnt', 17, 2)->notNull()->default(0.00)->comment('当前分类');
        });
    }

    public function down()
    {
        Schema::dropIfExists('hscoin_stats');
    }
}